<%--
  Created by IntelliJ IDEA.
  book: liuxianan
  Date: 2021/7/18
  Time: 4:00 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生清单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

</head>

<body>

    <div class="container">

        <div class="row clearfix">
            <div class="page-header">
                <h1>
                    <small>学生列表 —— 显示所有学生</small>
                </h1>
            </div>
        </div>

    </div>

<%--    <nav class="navbar navbar-inverse" role="navigation">--%>
<%--        <div class="container-fluid">--%>
<%--            <div class="navbar-header">--%>
<%--                <a class="navbar-brand" href="${pageContext.request.contextPath}/root/rootIndex">智慧管理</a>--%>
<%--            </div>--%>
<%--            <div>--%>
<%--                <form class="navbar-form navbar-left" role="search">--%>
<%--                    <div class="form-group">--%>
<%--                        <input type="text" class="form-control form-control-dark w-100" placeholder="Search">--%>
<%--                    </div>--%>
<%--                    <button type="submit" class="btn btn-default">登出</button>--%>
<%--                </form>--%>
<%--            </div>--%>
<%--        </div>--%>
<%--    </nav>--%>


<%--    <ul class="nav nav-pills nav-stacked" style="width:200px;text-align:center">--%>
<%--        <li class="active">--%>
<%--            <a href="#" data-toggle="collapse" data-target=".ok1">学生成长分析平台</a>--%>
<%--            <ul class="nav nav-pills nav-stacked ok1 collapse">--%>
<%--                <li><a href="${pageContext.request.contextPath}/student/allStudent">学籍管理</a></li>--%>
<%--            </ul>--%>
<%--        </li>--%>
<%--        <li class="active">--%>
<%--            <a href="#" data-toggle="collapse" data-target=".ok2">教师专业发展管理</a>--%>
<%--            <ul class="nav nav-pills nav-stacked ok2 collapse">--%>
<%--                <li><a href="${pageContext.request.contextPath}/teacher/allTeacher">教师信息管理</a></li>--%>
<%--                <li><a href="${pageContext.request.contextPath}/teacher/salary">工资福利管理</a></li>--%>
<%--                <li><a href="${pageContext.request.contextPath}/teacher/achieve">绩效考核</a></li>--%>
<%--            </ul>--%>
<%--        </li>--%>
<%--        <li class="active">--%>
<%--            <a href="#" data-toggle="collapse" data-target=".ok3">教务管理</a>--%>
<%--            <ul class="nav nav-pills nav-stacked ok3 collapse">--%>
<%--                <li><a href="${pageContext.request.contextPath}/root/course">智能排课</a></li>--%>
<%--                <li><a href="${pageContext.request.contextPath}/root/selectCourse">选修课管理</a></li>--%>
<%--                <li><a href="${pageContext.request.contextPath}/root/analyze">分析统计</a></li>--%>
<%--            </ul>--%>
<%--        </li>--%>
<%--    </ul>--%>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/student/toAddStudent">新增</a>
        </div>
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/root/rootIndex">返回</a>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>生日</th>
                    <th>户籍</th>
                    <th>院号</th>
                    <th>课号</th>
                </tr>
                </thead>

                <tbody>
                <c:forEach var="student" items="${requestScope.get('list')}">
                    <tr>
                        <td>${student.getSno()}</td>
                        <td>${student.getSname()}</td>
                        <td>${student.getSsex()}</td>
                        <td>${student.getSbirth()}</td>
                        <td>${student.getShometown()}</td>
                        <td>${student.getDno()}</td>
                        <td>${student.getCno()}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/student/toUpdateStudent?Sno=${student.getSno()}">更改</a> |
                            <a href="${pageContext.request.contextPath}/student/del/${student.getSno()}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>


</body>
</html>
